import request from '@/utils/request'

export default {
  //轮播图查询
  getBannerList(current,limit,bannerQuery){
    return request({
      url: `/educms/admin-banner/pageBannerCondition/${current}/${limit}`,
      method: 'post',
      //data表示把对象转换json进行传递到接口里面
      data:bannerQuery
    })
  },
  //添加轮播图
  addBanner(banner){
    return request({
      url: `/educms/admin-banner/addBanner`,
      method: 'post',
      //data表示把对象转换json进行传递到接口里面
      data:banner
    })
  },
  //删除轮播图
  deleteBannerId(id){
    return request({
      url: `/educms/admin-banner/deleteBanner/${id}`,
      method: 'delete',
    })
  },
  //修改轮播图
  editBanner(banner){
    return request({
      url: `/educms/admin-banner/updateBanner`,
      method: 'post',
      //data表示把对象转换json进行传递到接口里面
      data:banner
    })
  },
  //修改轮播图
  editBannerById(id){
    return request({
      url: `/educms/admin-banner/getBannerById/${id}`,
      method: 'get',
    })
  }
}
